package com.example.user.pojo;

import io.swagger.annotations.ApiModelProperty;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

/**
 * @BelongsProject: fourperiodtest
 * @BelongsPackage: com.example.user.pojo
 * @Author: 江岸
 * @CreateTime: 2020-06-30 10:28
 * @Description:
 */
public class User {
    @ApiModelProperty(value = "用户id。前端不要传该值" ,name = "id")
    private Integer id;
    @ApiModelProperty(value = "用户名。6~10位" ,name = "userName")
    @Size(min = 6,max = 10,message = "用户名长度在6~10之间")
    @NotNull(message="用户名不为空")
    private String userName;
    @ApiModelProperty(value = "密码。6~10位" ,name = "password")
    @Size(min = 6,max = 10,message = "密码长度在6~10之间")
    @NotNull(message="密码不为空")
    private String password;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public User(Integer id, String userName, String password) {
        this.id = id;
        this.userName = userName;
        this.password = password;
    }

    public User() {

    }
}
